from django import template
from django.conf import settings
from django.utils import safestring

register = template.Library()

@register.simple_tag
def fb_open_graph_meta_tags(object):
  attrs = object.get_open_graph_attributes()
  tags = ['<meta property="%s" content="%s" />' % (x[0], x[1]) for x in attrs]
  return safestring.mark_safe('\n'.join(tags))
